package com.crm.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "sourceinfo")
public class SourceInfo implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	private int id;
	private int enqid;
	private int prtnum;
	private int req_qty;
	private int sourceid;
	
	private int suplierid;
	private float utprice;
	private int qty_available;
	private int lead_time;
	private String currency;
	private int moq;
	private String conditions;
	private String make;
	
	@Column(name="offerpartno")
	private String offerPartNo;
	
	@ManyToOne
	@JoinColumn(name="BUSINESS_ID")
	private Business businessId;
	


	public Business getBusinessId() {
		return businessId;
	}

	public void setBusinessId(Business businessId) {
		this.businessId = businessId;
	}

	public int getSourceid() {
		return sourceid;
	}

	public void getSourceid(int srcid) {
		this.sourceid=srcid;
	}

	public String getOfferPartNo() {
		return offerPartNo;
	}

	public void setOfferPartNo(String offerPartNo) {
		this.offerPartNo = offerPartNo;
	}

	private int stdpackqty;
	

	public int getStdpackqty() {
		return stdpackqty;
	}

	public void setStdpackqty(int stdpackqty) {
		this.stdpackqty = stdpackqty;
	}

	public int getLead_time() {
		return lead_time;
	}

	public void setLead_time(int lead_time) {
		this.lead_time = lead_time;
	}

	public SourceInfo(){
		
	}

	public SourceInfo(int enqId, Business businessId, float uprice, int spq, int sourceid,
			int supplierId, int partNumber, Integer requiredQty, Float unitPrice,
			String currency, Integer availableQty, Integer moq, String cond,
			String make, String opn) {
		this.enqid=enqId;
		this.businessId=businessId;
		this.utprice=uprice;
		this.stdpackqty= spq;
		this.sourceid=sourceid;
		this.suplierid=supplierId;
		this.prtnum=partNumber;
		this.req_qty=requiredQty;
		this.utprice=unitPrice;
		this.currency=currency;
		this.qty_available=availableQty;
		this.moq=moq;
		this.conditions=cond;
		this.make=make;
		this.offerPartNo=opn;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	/*public int getUtprice() {
		return utprice;
	}

	public void setUtprice(int utprice) {
		this.utprice = utprice;
	}*/

	
	public static long getSerialVersionUID() {
		return serialVersionUID;
	}

	public int getEnqid() {
		return enqid;
	}

	public void setEnqid(int enqid) {
		this.enqid = enqid;
	}

	public int getPrtnum() {
		return prtnum;
	}

	public void setPrtnum(int prtnum) {
		this.prtnum = prtnum;
	}

	public int getSuplierid() {
		return suplierid;
	}

	public void setSuplierid(int suplierid) {
		this.suplierid = suplierid;
	}

	public int getQty_available() {
		return qty_available;
	}

	public void setQty_available(int qty_available) {
		this.qty_available = qty_available;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public int getMoq() {
		return moq;
	}

	public void setMoq(int moq) {
		this.moq = moq;
	}

	

	public String getConditions() {
		return conditions;
	}

	public void setConditions(String conditions) {
		this.conditions = conditions;
	}

	public String getMake() {
		return make;
	}

	public void setMake(String make) {
		this.make = make;
	}

	

	public void setSourceid(int sourceid) {
		this.sourceid = sourceid;
	}

	public int getReq_qty() {
		return req_qty;
	}

	public void setReq_qty(int req_qty) {
		this.req_qty = req_qty;
	}

	public float getUtprice() {
		return utprice;
	}

	public void setUtprice(float utprice) {
		this.utprice = utprice;
	}

	
	@Override
	public String toString(){
		return " EnquiryId:"+enqid+" SupplierId:"+suplierid+" SourceId:"+sourceid;
	}
}
